import 'package:flutter/material.dart';

// ignore: must_be_immutable
class NewsPage extends StatefulWidget {
  String title;
  String aid;
  NewsPage({super.key, this.title = '新闻', this.aid = ''});

  @override
  State<NewsPage> createState() => _NewsPageState();
}

class _NewsPageState extends State<NewsPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Text(widget.aid),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          // TODO 返回上个页面
          Navigator.pop(context);
        },
        child: const Icon(Icons.home),
      ),
    );
  }
}
